package com.bigger.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "`order`")//这里注意一定要这样写表明，因为order是sql中的一个关键字
public class Order {
    /**
     * 待发货
     */
    public static final Integer WAIT_GIVE=1;
    /**
     * 正在发货
     */
    public static final Integer GIVING=2;
    /**
     * 已完成
     */
    public static final Integer FINISH=3;
    /**
     * 已取消
     */
    public static final Integer CANCEL=4;
    /**
     * 未支付
     */
    public static final Integer NO_PAY=5;
    //上面几处命名不规范请见谅
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String orderNumber;
    private Long addressId;
    private Long userId;
    private Double price;
    private Long employeeId;
    private Integer status;
    private String emplName;
    private LocalDateTime createTime;
    private LocalDateTime finishTime; //完成时间
}
